package com.qfjy.homework.xiachangan;

/**
 * @author: XiaChang'an
 * @Description TODO 观察者模式实现
 * @Date: 2022/6/29 下午 05:31
 * @version: 1.0
 **/
public class ObserverPattern {

    public static void main(String[] args) {

        Subject subject = new ConcreteSubject();
        Observer obs1 = new ConcreteObserver1();
        Observer obs2 = new ConcreteObserver2();

        subject.add(obs1);
        subject.add(obs2);

        subject.notifyObserver();
    }
}
